#ifndef _STARTUP_ANIMATION_H_
#define _STARTUP_ANIMATION_H_

#include "sys_port.h"
#include "root.h"

#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))

#define LOGO_NUM     (65)
#define LOADING_NUM  (18)

typedef struct {

    uint8_t      step;
    uint8_t      l_cnt;
    lv_obj_t*    img_logo;

    lv_obj_t*    img_loading;
    lv_obj_t*    img_load_tip;
    
    lv_timer_t*  logo_time;
    lv_img_dsc_t logo_img[LOGO_NUM];
    lv_img_dsc_t loading_img[LOADING_NUM];

}ui_startup_widget_t;


void ui_init_loading_page_src(lv_obj_t *superview);

void ui_init_startup_page_src(lv_obj_t *superview);

static void on_page_startup_view_did_load(page_base_t* self);

page_vtable_t * lv_page_startup_create(void);
page_vtable_t* lv_page_root_create(void);

#endif // _STARTUP_ANIMATION_H_
